feat(deps)!: Update dependency jsdom (29.1.1 → 30.0.1) - #671
Conversation
jsdom v30 exposed a latent issue: ssr.noExternal caused Vite to bundle React in production mode, which strips act(). Without act, createRoot never flushes and @testing-library/react renders empty containers. - vitest.config.ts: define process.env.NODE_ENV=test so React's dev bundle (with act) is used - vitest.setup.ts: replace stale React.act polyfill with proper IS_REACT_ACT_ENVIRONMENT flag All 2034 tests pass.
Superseded by a newer automated review for this pull request.
There was a problem hiding this comment.
AI Automated Review
Full PR review.
Analysis engine: MiniMax-M2.7@https://litellm.jory.dev/v1 (anthropic) — escalated (fast_request_changes,fast_low_confidence)
Review Summary
Recommendation: Request changes — the full test suite has not completed due to CI timeout, which is a mandatory check for this dependency upgrade.
Change-by-Change Analysis
package.json / package-lock.json
- jsdom upgraded from
^29.1.1→^30.0.0 - Accompanying transitive dependency bumps:
@asamuzakjp/css-color(5.1.11 → 6.0.5),@asamuzakjp/dom-selector(7.1.1 → 8.3.0), undici (7.28.0 → 8.9.0) - No direct API usage of jsdom surfaced in the diff; jsdom is used exclusively as the Vitest test environment
vitest.config.ts
- Added
define: { "process.env.NODE_ENV": JSON.stringify("test") }— forces React's development bundle so that@testing-library/react'sact()calls work correctly with jsdom v30
vitest.setup.ts
- Removed the old
React.actpolyfill (which was needed for React 19 + older@testing-library/react) - Replaced with
IS_REACT_ACT_ENVIRONMENT = trueonglobalThis— required by jsdom v30 to flush React 19 renders synchronously via MessageChannel
Standards Compliance
- Code follows repository conventions (Vitest config patterns, test setup patterns)
- No secrets committed
- Docker base image (node:24-bookworm-slim) is consistent with the Node 24 requirement
Required Checks
✅ Breaking API changes in updated dependencies
Verified: jsdom v30.0.0 has one documented breaking change: the Node.js minimum version was raised from ^20.19.0 || ^22.13.0 || >=24.0.0 to ^22.22.2 || ^24.15.0 || >=26.0.0. The repository runs on node:24-bookworm-slim (Node 24.15.0 per git log commit 620f1fb), which satisfies this requirement. No Node 20.x or older Node 22.x versions are used in the Docker image. All other changes in jsdom v30.0.0–v30.0.1 are additive or bug fixes (CSS.escape, CSS.supports, background-position-x/y, getComputedStyle regressions).
❌ Run full test suite after upgrade
Not verifiable — CI timed out before the Tests job completed. CI results show:
- Docker Build: ✅ success
- Build: ✅ success
- Lint: ✅ success
- Typecheck: ✅ success
- Tests: ⏳ pending (CI timeout)
The test configuration changes in vitest.config.ts and vitest.setup.ts are directly driven by the jsdom v30 upgrade and represent known compatibility work (also evidenced by repository commit bf78285 — "Fix jsdom v30 test breakage: force NODE_ENV=test for React act()"). However, without a passing test suite run, the upgrade cannot be approved for a production dependency.
Unknowns / Needs Verification
- Test suite outcome: CI timed out before the Tests job ran to completion. The full suite must pass on this PR's commit before merge. If tests fail, the
vitest.config.ts/vitest.setup.tschanges may need further adjustment to account for jsdom v30 behavior differences not captured in the current patch.
This PR contains the following updates:
^29.1.1→^30.0.0Warning
Some dependencies could not be looked up. Check the Dependency Dashboard for more information.
Release Notes
jsdom/jsdom (jsdom)
v30.0.1Compare Source
getComputedStyle()withcalc()and other functions throwing an exception, which regressed in v30.0.0. (@asamuzaK)v30.0.0Compare Source
Breaking changes:
^22.22.2 || ^24.15.0 || >=26.0.0.Other changes:
CSS.escape()andCSS.supports()functions. (@asamuzaK)'background-position-x'and'background-position-y'CSS properties. (@olagokemills)getComputedStyle()to convert length values into pixels. (@asamuzaK)getPropertyValue(). (@asamuzaK)document.evaluate()(@dokson)Configuration
📅 Schedule: (in timezone America/Edmonton)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate.